﻿@page
@using Acme.HotelStore.Web.Pages.HotelStore
@using Microsoft.Extensions.Localization
@using Microsoft.AspNetCore.Authorization
@using Acme.HotelStore.Localization
@using Acme.HotelStore.Permissions;
@model IndexModel
@inject IStringLocalizer<HotelStoreResource> L
@inject IAuthorizationService AuthorizationService
@section scripts
{
    <abp-script src="/Pages/HotelStore/Index.js" />
}
<abp-card>
    <abp-card-header>
        <abp-row>
            <abp-column size-md="_6">
                <abp-card-title>@L["HotelList"]</abp-card-title>
            </abp-column>
            <abp-column size-md="_6" class="text-right">
                @if (await AuthorizationService.IsGrantedAsync(HotelStorePermissions.Hotel.Create))
                {
                    <abp-button id="NewBookButton"
                                text="@L["New"]"
                                icon="plus"
                                button-type="Primary" />
                }
             </abp-column>
        </abp-row>
    </abp-card-header>
    <abp-card-body>
        <abp-table striped-rows="true" id="Table"></abp-table>
    </abp-card-body>
</abp-card>